#include <sstream>
#include "UnitTest/TestFailureException.hpp"

namespace unit_test {

TestFailureException::TestFailureException(unsigned int line,
    const std::string &message)
    : std::runtime_error(message)
{
  std::ostringstream oss;

  oss << "\033[1;33mLine " << line << ":\033[0m \"" << message << "\"";
  mMessage = oss.str();
}

TestFailureException::~TestFailureException() throw () {

}

const char *TestFailureException::what() const throw () {
  return mMessage.c_str();
}

}
